﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Start.aspx.cs" Inherits="Start" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <asp:GridView ID="GridView1" runat="server" AllowPaging="True" 
        AutoGenerateColumns="False" DataKeyNames="MovieID" 
        DataSourceID="SqlDataSource1" Height="800px">
        <Columns>
            <asp:HyperLinkField DataNavigateUrlFields="MovieID" 
                DataNavigateUrlFormatString="~/Movie.aspx?MovieID={0}" DataTextField="Title" 
                HeaderText="Title" />
            <asp:BoundField DataField="Description" HeaderText="Description" 
                SortExpression="Description" />
            <asp:BoundField DataField="Length" HeaderText="Length" 
                SortExpression="Length" />
            <asp:BoundField DataField="Director" HeaderText="Director" 
                SortExpression="Director" />
            <asp:BoundField DataField="AvailabilityDate" HeaderText="AvailabilityDate" 
                SortExpression="AvailabilityDate" />
            <asp:BoundField DataField="Rating" HeaderText="Rating" 
                SortExpression="Rating" />
        </Columns>
    </asp:GridView>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:DatabaseConnectionString %>" 
        SelectCommand="SELECT MovieID, Title, Description, Length, Director, AvailabilityDate, Rating FROM Movie">
    </asp:SqlDataSource>
</asp:Content>

